#!/usr/bin/perl

use Web::Scraper;
use URI;
use YAML;
use LWP::UserAgent;

my $ua = LWP::UserAgent->new;
$ua->proxy('http', 'http://proxy.internal:8080');
$Web::Scraper::UserAgent = $ua;

my $url = 'http://www6.shizuokanet.ne.jp/takan/local1.htm'; 

my $scraper = scraper {
   process 'title','title[]' => 'TEXT'; 
#   process '//h3/following-sibling::p','description[]' => 'TEXT';
   process '//body/h3','language[]' => 
       scraper {
            process '//h3','name[]'     => 'TEXT';
      };
   result qw/title description language/
}->scrape(URI->new($url));

print YAML::Dump($scraper);

__END__

